﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Exhibition.Dao.ViewModel;
using Exhibition.Service;

namespace Exhibition.Manage
{
    public partial class AreaDetail : BaseAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                LoadArea();
            }
        }

        private void LoadArea()
        {
            List<AreaModel> areas = CenterService.areaService.GetListByPid(0);
            ParentId.DataTextField = "AreaName";
            ParentId.DataValueField = "Id"; 
            ParentId.DataSource = areas; 
            ParentId.DataBind();
            ParentId.Items.Insert(0,new ListItem("作为顶级", "0"));
        }
    }
}